<!DOCTYPE html>
<html>
<head>
    <title>修改住院信息--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script>
        function getQueryString(name) {
            var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
            var r = window.location.search.substr(1).match(reg);
            if (r != null) {
                return unescape(r[2]);
            }
            return null;
        }
        // 这样调用：
        var queryString = getQueryString("hosR_id");
        alert(queryString);
        $(function () {
            $.ajax({
                type: "GET",
                url: "/hos/queryById",
                data: "hosR_id="+queryString,
                dataType:"json",
                success:function (vo) {
                    let data=vo.obj;
                    $("#hosR_id").val(data.hosR_id);
                    $("#hosR_name").val(data.hosR_name);
                    $("#hosR_idCar").val(data.hosR_idCar);
                    $("#hosR_medical").val(data.hosR_medical);
                    $("#hosR_phone").val(data.hosR_phone);
                    data.hosR_selfPrice==1?$("#d2").prop('checked',true):$("#d1").prop('checked',true);
                    data.hosR_sex==1?$("#s1").prop('checked',true):$("#s0").prop('checked',true);
                    $("#hosR_age").val(data.hosR_age);
                    data.hosR_lookDoctor=="初诊"?$("#c1").prop('checked',true):$("#c2").prop('checked',true);
                    $("#dept").html('<option>'+data.dept.deptName+'</option>')
                    $("#doctorName").html('<option>'+data.doctor.doctorName+'</option>')
                    $("#hosR_remark").val(data.hosR_remark);
                    $("#beH_nursePeople").val(data.behospital.beH_nursePeople);
                    $("#beH_patBed").val(data.behospital.beH_patBed);
                    $("#beH_illness").val(data.behospital.beH_illness);
                }
            })
        })
    </script>
    <script type="text/javascript">
    $(function () {       
		$('#backid').click(function(){
				window.location.href="index.html";
		 });
    });
    </script>
</head>
<body>
<form action="index.html" method="post" class="definewidth m20">
<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <td width="10%" class="tableleft">病历号</td>
        <td><input type="text" id="hosR_id" name="hosR_id"></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">姓名</td>
        <td><input type="text" id="hosR_name" name="hosR_name"></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">证件类型</td>
        <td>身份证</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">证件号</td>
        <td><input type="text" id="hosR_idCar" name="hosR_idCar"></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">社保号</td>
        <td><input type="text" name="hosR_medical" id="hosR_medical"></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">联系电话</td>
        <td><input type="text" id="hosR_phone" name="hosR_phone"></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">是否自费</td>
        <td>
            <input type="radio" name="hosR_selfPrice" id="d1"  value="1"/>否&nbsp;&nbsp;&nbsp;
            <input type="radio" name="hosR_selfPrice" id="d2" value="0"/>是
        </td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">性别</td>
        <td>
            <input type="radio" name="hosR_sex" id="s1" value="1" />男&nbsp;&nbsp;&nbsp;
            <input type="radio" name="hosR_sex" id="s0" value="0"/>女
        </td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">年龄</td>
        <td><input type="text" id="hosR_age" name="hosR_age"></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">初复诊</td>
        <td>
            <input type="radio" name="hosR_lookDoctor" id="c1" value="初诊"/>初诊&nbsp;&nbsp;&nbsp;
            <input type="radio" name="hosR_lookDoctor" id="c2" value="复诊"/>复诊
        </td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">所挂科室</td>
        <td>
            <select id="dept">

            </select>
        </td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">指定医生</td>
        <td>
            <select id="doctorName">

            </select>
        </td>
    </tr>
	<tr>
        <td width="10%" class="tableleft">备注</td>
        <td><input type="text" id="hosR_remark" name="hosR_remark"> </td>
	</tr>
    <tr>
        <td width="10%" class="tableleft">护理</td>
        <td><input type="text" name="beH_nursePeople"  id="beH_nursePeople" value="王小丫"/></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">床位号</td>
        <td><input type="text" id="beH_patBed" name="beH_patBed" value="468"/></td>
    </tr>

    <tr>
        <td width="10%" class="tableleft">病情</td>
        <td><textarea id="beH_illness" name="beH_illness"></textarea></td>
    </tr>
    <tr>
        <td colspan="2">
			<center>
				<button type="submit" class="btn btn-primary" type="button">保存</button> &nbsp;&nbsp;<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
			</center>
		</td>
    </tr>
</table>
</form>
</body>
</html>